﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SocialFront.Entities;
using SocialFront.Providers.Image;
using SocialFront.Providers.Relationship;

namespace SocialFront.Web.usercontrols.Gallery
{
    public partial class MemberHomeImageList : System.Web.UI.UserControl
    {
        public string MemberImageUrl { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            IList<Member> members = RelationshipProvider.Provider.GetMemberRelatedToCurrentNode();
            List<Entities.Image> images = ImageProvider.Provider.GetImagesByMember(members[0].Id, 4, 1);
            imageList.DataSource = images;
            imageList.DataBind();

            MemberImageUrl = ImageProvider.Provider.GetMemberImageUrl(members[0].Id);
        }
    }
}